<template>
      <header>
        <img @click="onBack" class="pre" src="../../../static/imgs/pre.png"/>
        <div class="title">{{title}}</div>
        <div class="pre">
          <slot name="right"></slot>
        </div>
      </header>
</template>

<script>
    export default {
        name: 'vHeader',

        data() {
            return {
              address: ''
            }
        },

        props: {
          title: {
            type: String
          }
        },

        components: {},

        created() {},

        watch: {},

        computed: {},

        filters: {},

        methods: {
          onBack() {
            this.$emit('back')
          }
        }
    }
</script>

<style scoped lang="scss">
  @import '../../../static/css/mixin';
  header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 30;
    @include whl(100%, 1.28rem);
    @include fja();
    padding: 0 .36rem;
    background-color: $tc;
    .pre {
      @include wh(.2rem, .32rem)
    }
    .title {
      @include fscfw(.36rem, $fc)
    }
  }
</style>
